<?php
class Model_Image extends ORM {

	protected $_table_name = 'images';
	
	protected $_belongs_to = array(
		'item' => array(
			'model' => 'item',
			'foreign_key' => 'image_id',
			),
		'thumb' => array(
			'model' => 'thumb',
			'foreign_key' => 'thumb_id')
		);
	
	public function path() {
		return DOCROOT.$this->dir.$this->filename;
	}
}